package com.yj.rocketmq.consumer.impl;


import com.yj.rocketmq.consumer.AbstractMsgConsumer;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;


/**
 * RocketMQ消费者
 *
 * @author Xie
 * @date 19-3-19
 */
@Slf4j
@Service("mqConsumer")
public class MqConsumer extends AbstractMsgConsumer {

    @Value("${cloud.rocketMq.namesrv:null}")
    private String nameSrv;

    @Value("${spring.application.name:null}")
    private String consumerGroup;

    @Value("${cloud.rocketMq.topic:null}")
    private String topic;

    @Value("${cloud.consumerEnable:false}")
    private Boolean consumerEnable;

    @Override
    protected String getNameSrv() {
        return nameSrv;
    }

    @Override
    protected String getConsumerGroup() {
        return consumerGroup;
    }

    @Override
    protected String getTopic() {
        return topic;
    }

    @Override
    protected Boolean getConsumerEnable() {
        return consumerEnable;
    }
}
